home *** CD-ROM | disk | FTP | other *** search
/ FishMarket 1.0 / FishMarket v1.0.iso / fishies / 326-350 / disk_350 / trackutils / tfile.doc < prev    next >
Text File  |  1992-05-06  |  6KB  |  130 lines

  1.  
  2.                       TFILE -- reserves tracks on a disk
  3.  
  4.              (C) Copyright Eddy Carroll 1990. Freely distributable.
  5.  
  6.  
  7. INTRODUCTION
  8.  
  9.     There are occasionally times when you want highspeed access to floppy
  10.     disks, and don't want the overhead associated with going through
  11.     AmigaDos. One example might be a program to play sound samples
  12.     directly from disk (reading in a track's worth of data at a time).
  13.     Another example is copying a "minidisk" into RAD: during bootup (see
  14.     the documentation for TCOPY for more information on this).
  15.  
  16.     This is fine in theory, but if you go and start using disk tracks for
  17.     your own data, sooner or later you're going to overwrite some AmigaDOS
  18.     information (or AmigaDOS will overwrite your tracks). What you really
  19.     need is a way to tell AmigaDOS not to use the tracks that you are
  20.     using.
  21.  
  22.     This is in fact exactly what TFILE does (what a coincidence :-)
  23.     It creates a dummy file on a disk that looks to AmigaDOS as if it
  24.     contains all the blocks associated with a range of tracks. You can
  25.     then happily intermix your private data and standard AmigaDOS files
  26.     without any danger of one corrupting the other. For example, if you
  27.     have a game that wants direct access to your hard drive, you could
  28.     reserve a few cylinders for it to use without having to do a complete
  29.     reformat and partition. Similarly for something like AMax.
  30.  
  31.  
  32. USAGE
  33.  
  34.     The command template for Tfile looks like this:
  35.  
  36.         tfile <pathname> <start> <end>
  37.  
  38.     <pathname> is the full AmigaDOS pathname of the file you want to
  39.     create which will reserve the tracks. You must specify a disk device
  40.     (such as DF0:) rather than a volume name. You may like to stick the
  41.     file out of the way in the Devs directory or some such place, called
  42.     something like TracksX-Y.
  43.  
  44.     <start> and <end> specify the range of tracks to be reserved. When
  45.     you run Tfile, these tracks must not be in use by AmigaDOS or Tfile
  46.     will complain. Hence, it's a good idea to run Tfile shortly after you
  47.     have just formatted a disk, and only then copy over any AmigaDOS files
  48.     you want to use (AmigaDOS will arrange them nicely around your reserved
  49.     tracks). Obviously, <start> must be less than <end>, and neither can
  50.     exceed the number of tracks available on the disk. Tracks are numbered
  51.     from 0 upwards, so the 80 tracks on DF0: are numbered 0 to 79.
  52.  
  53.     AmigaDOS usually reserves a few blocks at the start of a disk for
  54.     private information. The bootblock on floppy disks is a good example
  55.     of this. If the track range you specify includes these reserved blocks,
  56.     Tfile will print a warning message. You can safely ignore this -- it is
  57.     just there to remind you that you need to be careful writing to the
  58.     tracks you specified so as not to overwrite important information.
  59.  
  60.     To make things clearer, a quick example might be useful. Lets suppose
  61.     you want to reserve the last 10 tracks on a floppy disk for some
  62.     reason (tracks 70 to 79). Just put the disk in DF0: and say
  63.  
  64.         tfile df0:Tracks70-79 70 79
  65.  
  66.     and after a few moments of disk access, you will find yourself with
  67.     a new file which is 107848 bytes in size, and a correspondingly
  68.     smaller amount of room on the disk.
  69.  
  70.  
  71. ADDITIONAL NOTES
  72.  
  73.     Tfile will work with both the old filing system and fast filing system.
  74.     On the OFS, if you try to display the dummy file, you will see a brief
  75.     message telling you that it isn't a real file, and describing which
  76.     tracks it reserves. You will not be able to access anything other
  77.     than the message, and it's not a good idea to try and fool AmigaDOS
  78.     into letting you.
  79.  
  80.     On the FFS, you will see the same message, but shortly after that will
  81.     come the actual raw track data itself. This is due to the different
  82.     ways the OFS and FFS store the data blocks of a file. If you have a
  83.     file editor such as NewZap, you can even edit the disk blocks directly;
  84.     with the exception of the initial "message" block, the blocks are
  85.     arranged in sequence from the start to end track.
  86.  
  87.     You can have several different portions of the disk reserved if you
  88.     like (you might want to reserve almost all of the disk except for a
  89.     little bit in the middle for the AmigaDOS root block).
  90.  
  91.     When you are finished using the tracks, you can release the blocks
  92.     back to AmigaDOS by deleting the dummy file.
  93.  
  94.     You may occasionally have trouble finding free room on a disk. David
  95.     Gay has written a nice pair of programs which display disk fragmentation
  96.     and free blocks. These can be found on Fish Disk 278
  97.     under the collective title `frag'.
  98.  
  99.  
  100. FUTURE ADDITIONS
  101.  
  102.     One thing I would like to add is the ability to read in a list of
  103.     block numbers from a file and reserve those blocks listed, rather
  104.     than being restricted to complete tracks. You could then use Tfile
  105.     to map out bad blocks on hard drives, in conjunction with some
  106.     program that would actually find such blocks for you. As it is,
  107.     you could use Tfile to map out bad tracks on AmigaDOS floppies,
  108.     but given the cost of blank disks these days and the chances of
  109.     a disk with one bad track developing others, it's not really
  110.     a sensible gamble.
  111.  
  112.     To add block lists would not be too difficult given the current
  113.     implementation; the only thing needed is time. Unfortunately, I don't
  114.     have very much of that at the moment, so don't expect them any time soon.
  115.  
  116.  
  117. RELEASE HISTORY
  118.  
  119.     V1.0
  120.         First release, January 1990. No known bugs, as yet.
  121.  
  122.  
  123. AUTHOR
  124.  
  125.     Please direct any praise, criticism, general suggestions or
  126.     large sums of money to:
  127.  
  128.     Eddy Carroll
  129.     ecarroll@vax1.tcd.ie (Trinity College, Dublin, Ireland)
  130.